﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace MetroLinx.Web
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in code, svc and config file together.
    public class CometService : ICometService
    {
        protected List<ICometClient> _clients = new List<ICometClient>();





        public void Send(CompositeType msg)
        {
            _clients.Add(OperationContext.Current.GetCallbackChannel<ICometClient>());

            foreach (ICometClient client in _clients)
            {
                client.Receive(msg);
            }

        }


    }
}
